package org.stvd.entities.message;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.stvd.entities.base.BaseEntity;
import org.stvd.entities.common.LongJsonDeserializer;
import org.stvd.entities.common.LongJsonSerializer;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 消息内容-实体类
 * @author hanxin
 *
 */
@Entity
@Table(name = "bs_message_log")
public class BsMessageLog extends BaseEntity{

    private static final long serialVersionUID = 1478340182115780558L;
    
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", nullable = false)
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id = null;

    /**
     * 接收者ID
     */
    @Column(name = "rec_id", nullable = false)
    private String recId = "";
    
    /**
     * 消息ID
     */
    @Column(name = "message_id", nullable = false)
    private Long messageId = null;
    
    /**
     * 状态{0：未读；1：已读；2：已删}
     */
    @Column(name = "status", nullable = false)
    private String status = "";

    /**
     * 消息类别
     */
    @Transient
    private String type = "";
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRecId() {
        return recId;
    }

    public void setRecId(String recId) {
        this.recId = recId;
    }

//    public String getContent() {
//        return content;
//    }
//
//    public void setContent(String content) {
//        this.content = content;
//    }

    public Long getMessageId() {
        return messageId;
    }

    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}


